package com.linkit.model;

/**
 * Lưu trữ dữ liệu trả về từ server
 * @author lucnd
 *
 */
public class ServiceTaskResult<T extends Object>{
	Exception exception;
    T taskResult;

    
    public ServiceTaskResult() {
    	this.exception = null;
	}

    public boolean hasResult() {
        return taskResult != null;
    }
	public void setResult(T taskResult) {
        this.taskResult = taskResult;
    }

    public T getResult() {
        return taskResult;
    }

    public void setException(Exception exception) {
        this.exception = exception;
    }

    public boolean hasException() {
        return exception != null;
    }

    public Exception getException() {
        return exception;
    }
}
